import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
  path: '/login',
  name: 'login',
  component: () => import('../views/Login/Login.vue')
}, {
  path: '/commodity_list',
  name: 'commodity_list',
  component: () => import('../views/CommodityList/CommodityList')
}, {
  path: '/commodity_detail/:id',
  name: 'commodity_detail',
  component: () => import('../views/CommodityDetail/CommodityDetail')
}, {
  path: '/store_list',
  name: 'store_list',
  component: () => import('../views/StoreList/StoreList')
}, {
  path: '/order_list',
  name: 'order_list',
  component: () => import('../views/OrderList/OrderList')
}]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
})

export default router
